SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY           "${PROJECT_DESCRIPTION}")
SET(CPACK_PACKAGE_VENDOR                        "${PROJECT_AUTHOR}")
SET(CPACK_PACKAGE_DESCRIPTION_FILE              "${CMAKE_SOURCE_DIR}/README.md")
SET(CPACK_RESOURCE_FILE_LICENSE                 "${CMAKE_SOURCE_DIR}/LICENSE.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR                 "${VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR                 "${VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH                 "${VERSION_RELEASE}")
IF(VERSION_STAGE)
	SET(CPACK_PACKAGE_VERSION_PATCH         "${CPACK_PACKAGE_VERSION_PATCH}-${VERSION_STAGE}")
ENDIF()
IF(VERSION_BUILD)
	SET(CPACK_PACKAGE_VERSION_PATCH         "${CPACK_PACKAGE_VERSION_PATCH}-${VERSION_BUILD}")
ENDIF()
SET(CPACK_PACKAGE_INSTALL_DIRECTORY             "${PROJECT_NAME_UCASE}")
SET(CPACK_SOURCE_GENERATOR                      "TBZ2")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME              "${CMAKE_PROJECT_NAME}-${VERSION}")
SET(CPACK_PACKAGE_EXECUTABLES                   "${CMAKE_PROJECT_NAME}" "${PROJECT_NAME_UCASE} binary")

# Disable strip for Debug|RelWithDebInfo
if(CMAKE_BUILD_TYPE MATCHES "Deb")
	unset(CPACK_STRIP_FILES)
else()
	set(CPACK_STRIP_FILES TRUE)
endif()

IF(LMMS_BUILD_WIN32)
	ADD_SUBDIRECTORY(nsis)
ELSEIF(LMMS_BUILD_APPLE)
	ADD_SUBDIRECTORY(apple)
ELSE()
	ADD_SUBDIRECTORY(linux)
ENDIF()

INCLUDE(CPack)
